import request from '@/utils/request'
var PATH = "/user"
export default {


    getLogin(user){
        return request({
            url: `${PATH}/login`,
            method: "post",
            data:user
        })

    },

    //根据token获取用户信息
    getUserToken(token){
        return request({
            url: `${PATH}/token`,
            method: "post",
            data:token
        })
    },

    //修改用户
    updateUser(user){
        return request({
            url: `${PATH}/updateUser`,
            method: "post",
            data:user
        })
    },


       //修改用户密码
       updatePassword(oldPassword,urPassword,id){
        return request({
            url: `${PATH}/updatePassword?oldPassword=${oldPassword}&urPassword=${urPassword}&id=${id}`,
            method: "get",
        })
    },
      
    
}